<!DOCTYPE html>
<html>
	<head>
	  <meta charset="utf-8">
	  <base href="#(basePath)"/>
	  <meta name="renderer" content="webkit">
	  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	  <title>收银台</title>
	  <style type="text/css">
	  *{margin: 0;padding:0;}
	  a {text-decoration: none !important;background-color: transparent;}
	  a:visited{color:#1010f0;}
	  #header{background-color: #333;border-bottom: 1px solid rgba(0,0,0,0.1);}
	  #header-wrap {border-bottom-color: rgba(255,255,255,0.2);}
	  #header.full-header .container, .container-fullwidth {padding: 0 15px !important;margin: 0 auto;}
	  #logo {display: block;height: 100px;float: none;margin: 0 auto 0 !important;max-width: none;text-align: center;border: 0 !important;padding: 0 !important;position: relative;font-family: 'Raleway', sans-serif;font-size: 36px;line-height: 100%;}
	  #logo img {height: 100px;transition: height .4s ease, opacity .3s ease;display: block;max-width: 100%;border: none;}
	  	  
	  .r3v-fluid{position: relative; margin: 0 auto; padding: 0 15px;line-height: 50px;}
	  .r3v-col-sm3,.r3v-col-sm6{position: relative;display: block;box-sizing: border-box;}
	  @media screen and (min-width:768px){.r3v-col-sm6{float:left;width:50%}.r3v-col-sm3{float:left;width:24%}}
	  .r3v-row:after, .r3v-row:before {content: '';display: block;clear: both;}
	  
	  #wrap p{margin: 16px 32px;padding:0;}
	  #wrap p .success{font-size:22px;color:#fe1000;}
	  #wrap p .fail{font-size:22px;color:#fe1000;}
	  
	  #amount{text-align: right;height:1.4em;font-weight: bold;}
	  #amountShow{margin:0;font-size:1.5em;font-weight: bold;text-align: right;}/*color:#f18d00;*/
	  #payment{margin: 16px 32px;}
	  
	  #orderNo{color:#00f;}
	  #b2cPanel{border: 1px solid #dcdcdc;padding:1em 0;}
	  #b2cPanel legend{margin-left: 2em; font-weight: bold; font-size:1.2em;}
	  #bankList img{width:140px;height:40px;display: block;margin:12px 0;}
	  #bankList dd{margin: 2px;border: 1px solid #eaeaea;background-color:#fff;}
	  
	  .payBtn{text-decoration:none; width: 120px;height: 40px;line-height: 40px;font-size: 16px;background-color: #1abc9c;text-align: center;display: inline-block;color: #fff;padding: 0 10px;border-radius: 3px;margin: 30px 0 0 20px;}
	  
	  </style>
	</head>
	<body>
		<header id="header" class="transparent-header dark full-header no-sticky">
			<div id="header-wrap">
				<div class="container clearfix">
					<div id="logo">
						<a href="https://www.r3v.co/index.html" class="standard-logo" data-dark-logo="images/logo-dark.svg"><img src="https://www.r3v.co/images/logo-dark.svg" alt="R3V Logo"></a>
						<!-- <a href="https://www.r3v.co/index.html" class="retina-logo" data-dark-logo="images/logo-dark@2x.svg"><img src="https://www.r3v.co/images/logo-dark@2x.svg" alt="R3V Logo"></a> -->
					</div>
				</div>
			</div>
		</header>
		<div id="wrap">
			<form action="#(basePath)customer/order" method="post">
			#if(page=='payment')
			<div class="r3v-fluid" style="background-color: #f5f5f5">
				<div class="r3v-row">
					<div class="r3v-col-sm6"><label>支付金额：</label><input id="amount" name="amount" type="text" value="">元</div>
					<div class="r3v-col-sm6"><label>　订单号：</label><span id="merchOrderNo">#(merchOrderNo)</span><input name="merchOrderNo" value="#(merchOrderNo)" type="hidden"></div>
				</div>
			</div>
			<div id="payment">
				<fieldset id="b2cPanel">
					<legend>网银支付</legend>
					<input id="bank" name="bank" type="hidden" value="">
					<div id="bankList" class="r3v-fluid">
						<dl class="r3v-row">
							<dd class="r3v-col-sm3" title="中国邮政储蓄银行"><img alt="" src="#(basePath)banks/youchu.jpg" onclick="selectBank(this, 'POST')"></dd>
							<dd class="r3v-col-sm3" title="中国建设银行"><img alt="" src="#(basePath)banks/jianshe.jpg" onclick="selectBank(this, 'CCB')"></dd>
							<dd class="r3v-col-sm3" title="中国工商银行"><img alt="" src="#(basePath)banks/gongshang.jpg" onclick="selectBank(this, 'ICBC')"></dd>
							<dd class="r3v-col-sm3" title="中国农业银行"><img alt="" src="#(basePath)banks/nongye.jpg" onclick="selectBank(this, 'ABC')"></dd>
						</dl>
						<dl class="r3v-row">
							<dd class="r3v-col-sm3" title="中国民生银行"><img alt="" src="#(basePath)banks/minsheng.jpg" onclick="selectBank(this, 'CMBC')"></dd>
							<dd class="r3v-col-sm3" title="中国光大银行"><img alt="" src="#(basePath)banks/guangda.jpg" onclick="selectBank(this, 'CEB')"></dd>
							<dd class="r3v-col-sm3" title="北京银行"><img alt="" src="#(basePath)banks/beijing.jpg" onclick="selectBank(this, 'BJRCB')"></dd>
							<dd class="r3v-col-sm3" title="上海银行"><img alt="" src="#(basePath)banks/shanghai.jpg" onclick="selectBank(this, 'SHB')"></dd>
						</dl>
					</div>
				</fieldset>
				<a href="javascript:void(0)" onclick="payment()" class="payBtn">立即支付</a>
			</div>
			#end
			#if(page=='result')
			<div style="padding:1em;">
				<span><label>支付金额：</label><span id="amountShow">#(amount)</span>元</span>
				<span><label>订单号：</label><span id="merchOrderNo">#(merchOrderNo)</span><input name="merchOrderNo" value="#(merchOrderNo)" type="hidden"></span>
			</div>
			<div>
				#if(code=='00')
				<span class="success">#(message)</span>
				#end
				#if(code!='00')
				<span class="fail">#(message)</span>
				#end
				<p><a href="#(basePath)customer/casherdesk">&gt;&gt;继续支付</a></p>
			</div>
			#end
			</form>
		</div>
		<script src="#(basePath)build/dwz/js/jquery-2.1.4.min.js" type="text/javascript"></script>
		<script type="text/javascript">
		function selectBank(sender, bk) {
			$("#bank").val(bk);
			$("#bankList dd").each(function(){
				$(this).css("border", "1px solid #eaeaea");
			});
			$(sender).parent().css("border", "1px solid #f00");
		}
		function payment() {
			if($("#amount").val()==""){
				alert("请输入金额");
				return;
			}
			if(isNaN($("#amount").val())){
				alert("金额必须是数字");
				return;
			}
			/* if(isNaN($("#amount").val()) || $("#amount").val().indexOf(".")!= -1){
				alert("金额必须是元的整数");
				return;
			} */
			if($("#bank").val()==""){
				alert("请选择付款银行");
				return;
			}
			document.forms[0].submit();
		}
		</script>
	</body>
</html>